package com.SunSoft.PhoneRemoteControl;

import android.text.Editable;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.AutoCompleteTextView;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

final class fm
  implements View.OnClickListener
{
  public final void onClick(View paramView)
  {
    this.a.p.setFocusable(true);
    this.a.p.requestFocus();
    this.a.p.requestFocusFromTouch();
    ((InputMethodManager)this.a.getSystemService("input_method")).hideSoftInputFromWindow(this.a.getCurrentFocus().getWindowToken(), 2);
    if (this.a.ay)
      Toast.makeText(this.a, this.a.getString(2131099700), 0).show();
    do
    {
      do
      {
        do
        {
          return;
          if (this.a.T)
          {
            this.a.S = 0;
            Show_Search.g(this.a);
          }
          if ((!(this.a.Q)) && (this.a.S != 2))
            break label770;
          if (this.a.S != 1)
            continue;
          this.a.Q = false;
          this.a.S = 2;
          this.a.p.setImageResource(2130837620);
          this.a.R = false;
          return;
        }
        while (this.a.S != 2);
        this.a.K = false;
        String str1 = "";
        String str2 = this.a.g.getText().toString();
        if (str2.equals(""))
        {
          paramView = str1;
          if (this.a.ag != 3)
            break label350;
          paramView = str1;
          if (this.a.L <= 0)
            break label350;
        }
        if (this.a.ag == 3)
          if (this.a.L != 0);
        for (paramView = "" + " and (control_model  like '%" + str2 + "%' or brand_ch like  '%" + str2 + "%' or brand_en like '%" + str2 + "%'   or  " + this.a.o + " like '%" + str2 + "%') "; (paramView.equals(this.a.an)) && (this.a.ag == this.a.af); paramView = "" + " and (control_model  like '%" + str2 + "%' or brand_ch like  '%" + str2 + "%' or brand_en like '%" + str2 + "%'   or  " + this.a.o + " like '%" + str2 + "%') ")
          while (true)
          {
            label350: this.a.Q = true;
            this.a.S = 1;
            this.a.p.setImageResource(2130837621);
            this.a.R = false;
            return;
            if (this.a.L == 1)
              paramView = "" + " and (" + this.a.n + " like '%电信%' or name_ch like '%电信%' or control_model like '%电信%' or " + this.a.n + " like '%Telecom%' or " + this.a.n + " like '%IPTV%') ";
            paramView = "" + " and (" + this.a.n + " like '%卫星%' or name_ch like '%卫星%' or control_model like '%卫星%' or " + this.a.n + " like '%DVB%' or " + this.a.n + " like '%Satellite%') ";
          }
        this.a.Q = false;
        this.a.S = 0;
        Show_Search.g(this.a);
        this.a.r.setText(String.valueOf(Show_Search.c(this.a)));
        this.a.q.setText("0");
        this.a.p.setImageResource(2130837620);
        this.a.R = false;
        Show_Search.a("Test", "Start re search");
        this.a.a();
      }
      while (Show_Search.c(this.a) <= 0);
      this.a.p.setImageResource(2130837621);
      this.a.S = 1;
      this.a.Q = true;
      return;
      label770: this.a.a();
      this.a.K = false;
    }
    while (Show_Search.c(this.a) <= 0);
    this.a.p.setImageResource(2130837621);
    this.a.S = 1;
    this.a.Q = true;
  }
}